<%@ include file="/WEB-INF/jsp/includes.jsp" %>
<%@ include file="/WEB-INF/jsp/header.jsp" %>

<h2><fmt:message key="list.patients.title" /></h2>

<table>
  <thead>
    <th><fmt:message key="list.patients.name" /></th>
    <th><fmt:message key="list.patients.lastname" /></th>
    <th><fmt:message key="list.patients.historynumber" /></th>
  </thead>
  <c:forEach var="patient" items="${selections}">
    <tr>
      <td>
      	${patient.name}
      </td>
      <td>
      	${patient.lastName}
      </td>
      <td>
      	${patient.history}
      </td>
      <td>
         <spring:url value="patients/{patientId}/show" var="showUrl">
              <spring:param name="patientId" value="${patient.id}"/>
          </spring:url>
            <a href="${fn:escapeXml(showUrl)}">Ver</a>
      </td>
            <td>
          <spring:url value="consent/{patientId}/consent" var="consentUrl">
              <spring:param name="patientId" value="${patient.id}"/>
          </spring:url>
            <a href="${fn:escapeXml(consentUrl)}"><fmt:message key="list.patients.createconsent" /></a>
      </td>
      </tr>
  </c:forEach>
</table>

<%@ include file="/WEB-INF/jsp/footer.jsp" %>
